default:run

OUTPUT_DIR := output
$(shell if [ ! -e $(OUTPUT_DIR) ];then mkdir -p $(OUTPUT_DIR); fi)

build:
	g++ src/main/cc/main.cc -std=gnu++11 -o output/lanch-selector.bin

run:build
	./output/lanch-selector.bin

clang-chart:
	clang -cc1 -ast-dump src/main/cc/main.cc 2>/dev/null | egrep "FunctionDecl|Function"

gcc-chart:
	gcc src/main/cc/main.cc -fdump-tree-ssa -std=gnu++11 -o output/lanch-selector.bin

clean:
	rm -rf ${OUTPUT_DIR}/*


